package com.ruicar.afs.cloud.channel.online.feign;


import com.ruicar.afs.cloud.channel.online.condition.ChannelOnlineCondition;
import com.ruicar.afs.cloud.channel.online.entity.ChannelBaseInfoTemp;
import com.ruicar.afs.cloud.channel.online.entity.ChannelQuotaInfoTemp;
import com.ruicar.afs.cloud.channel.online.vo.ChannelOnlineInterFaceVo;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;
import java.util.Map;

/**
 * @description: 请求案件服务
 * @author: mingzhi
 * @date: 2020/6/9 9:10
 */
@FeignClient(name = "caseChanel", url = "${com.greatwall.services.case-service.url}")
public interface CaseFeignService {

    /**
     * 同步数据到案件服务
     *
     * @param vo
     * @param headers
     * @return
     */
    @PostMapping(value = "/channelCaseInfo/saveOrUpdate")
    @ApiOperation("同步渠道信息到案件服务")
    public IResponse synchronousDataToCase(@RequestBody ChannelOnlineInterFaceVo vo, @RequestHeader Map<String, String> headers);

    /**
     * 渠道额度占用/释放
     *
     * @param temp
     * @param headers
     * @return
     */
    @PostMapping(value = "/channelCaseInfo/limitTakeUpOrLease")
    @ApiOperation("渠道额度占用/释放")
    public IResponse limitTakeUpOrLease(@RequestBody ChannelQuotaInfoTemp temp, @RequestHeader Map<String, String> headers);

    /**
     * 批量修改经纬度范围同步案件服务
     *
     * @param tempList
     * @param headers
     * @return
     */
    @PostMapping(value = "/channelCaseInfo/saveLlRangeToCase")
    @ApiOperation("批量修改经纬度范围同步案件服务")
    public IResponse synchronousLlRangeToCase(@RequestBody List<ChannelBaseInfoTemp> tempList, @RequestHeader Map<String, String> headers);

    /**
     * 批量修改经纬度范围同步案件服务
     *
     * @param channelOnlineCondition
     * @param headers
     * @return
     */
    @PostMapping(value = "/channelCaseInfo/saveManageToCase")
    @ApiOperation("批量修改区域经理同步案件服务")
    public IResponse synchronousLlManagerToCase(@RequestBody ChannelOnlineCondition channelOnlineCondition, @RequestHeader Map<String, String> headers);
}
